{extend name="public/base"/}
{block name="body"}
<div class="main-box clearfix">
	<header class="main-box-header clearfix">
		<div class="pull-left">
			<h2>编辑公司</h2>
		</div>
	</header>
	<div class="main-box-body clearfix">
		<form action="{:url()}" method="post" class="form form-horizontal">
			<div class="tabs-wrapper">
				<ul class="nav nav-tabs">
					<li class="active">
						<a href="#tab-base" data-toggle="tab">基本信息</a>
					</li>
				</ul>
				<div class="tab-content">
					<div class="tab-pane fade in active" id="tab-base">

						<div class="form-group">
							<label class="col-lg-2 control-label">公司名</label>
							<div class="col-lg-8">
								<input type="text" disabled="disabled" name="name" class="form-control" value="{$org.name}">
							</div>
						</div>

						<div class="form-group">
							<label class="col-lg-2 control-label">区域</label>
							<div class="col-lg-8">
								<input type="text" disabled="disabled" class="form-control" value="{$org.province}-{$org.city}">
							</div>
						</div>
						<div class="form-group">
							<label class="col-lg-2 control-label">行业</label>
							<div class="col-lg-8">
								<input type="text" disabled="disabled" name="job" class="form-control" value="{$org.job}">
							</div>
						</div>


						<div class="form-group">
							<label class="col-lg-2 control-label">状态</label>
							<div class="col-lg-8">
								<select id="status" name="staus" class="form-control" style="width: auto;">
								<option value="-1" {if $org['status'] == -1}selected{/if}>未审核</option>
								<option value="1" {if $org['status'] == 1}selected{/if}>已审核</option>
								</select>
							</div>
						</div>

						<div class="form-group">
							<label class="col-lg-2 control-label">证件照</label>
							<div class="col-lg-8">
								<img width="300px" height="400px" src="/uploads{$org.cert_photo}">
							</div>
						</div>

						<div class="form-group">
							<label class="col-lg-2 control-label">二维码</label>
							<div class="col-lg-8">
								<img width="200px" height="200px" src="/uploads{$org.scan_code}">
							</div>
						</div>
						
					</div>

				</div>
			</div>
			<div class="form-group">
				<div class="col-lg-offset-2 col-lg-10">
					<input type="hidden" id="id" name="id" value="{$org['id']}">
					<button id="submit" class="btn btn-success submit-btn ajax-post" target-form="form">确认提交</button>
					<button class="btn btn-danger btn-return" onclick="javascript:history.back(-1);return false;">返 回</button>
				</div>
			</div>
		</form>
	</div>
</div>
{/block}

{block name="script"}
<link rel="stylesheet" type="text/css" href="__PUBLIC__/plugs/webuploader/webuploader.css">
<script type="text/javascript" src="__PUBLIC__/plugs/webuploader/webuploader.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/plugs/webuploader/webuploader.custom.js"></script>
<script type="text/javascript">

	$('#submit').click(function () {

		var status = $('#status').val();
		var id =$('#id').val();
		$.post('/admin/company/ajaxUpdate',{"id":id,"status":status},function (result) {

			window.location.href="/admin/company/index";
		});
	});

</script>
{/block}